package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.SchoolClassAggregatePropVO;
import com.easy.query.core.proxy.columns.SQLStringColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLQueryable;
import com.easy.query.core.proxy.columns.SQLAnyColumn;
import com.easy.query.core.proxy.columns.SQLNumberColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class SchoolClassAggregatePropVOProxy extends AbstractProxyEntity<SchoolClassAggregatePropVOProxy, SchoolClassAggregatePropVO> {

    private static final Class<SchoolClassAggregatePropVO> entityClass = SchoolClassAggregatePropVO.class;

    public static SchoolClassAggregatePropVOProxy createTable() {
        return new SchoolClassAggregatePropVOProxy();
    }

    public SchoolClassAggregatePropVOProxy() {
    }

    /**
     * {@link SchoolClassAggregatePropVO#getId}
     */
    public SQLStringColumn<SchoolClassAggregatePropVOProxy, java.lang.String> id() {
        return getStringColumn("id", java.lang.String.class);
    }

    /**
     * {@link SchoolClassAggregatePropVO#getName}
     */
    public SQLStringColumn<SchoolClassAggregatePropVOProxy, java.lang.String> name() {
        return getStringColumn("name", java.lang.String.class);
    }

    /**
     * 一对多 一个班级多个学生
     * {@link SchoolClassAggregatePropVO#getSchoolStudents}
     */
    public SQLQueryable<com.easy.query.test.entity.school.proxy.SchoolStudentProxy, com.easy.query.test.entity.school.SchoolStudent> schoolStudents() {
        return getNavigates("schoolStudents", new com.easy.query.test.entity.school.proxy.SchoolStudentProxy());
    }

    /**
     * {@link SchoolClassAggregatePropVO#getStudentSize}
     */
    public SQLNumberColumn<SchoolClassAggregatePropVOProxy, java.lang.Long> studentSize() {
        return getNumberColumn("studentSize", java.lang.Long.class);
    }


    @Override
    public Class<SchoolClassAggregatePropVO> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public SchoolClassAggregatePropVOProxyFetcher FETCHER = new SchoolClassAggregatePropVOProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class SchoolClassAggregatePropVOProxyFetcher extends AbstractFetcher<SchoolClassAggregatePropVOProxy, SchoolClassAggregatePropVO, SchoolClassAggregatePropVOProxyFetcher> {

        public SchoolClassAggregatePropVOProxyFetcher(SchoolClassAggregatePropVOProxy proxy, SchoolClassAggregatePropVOProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link SchoolClassAggregatePropVO#getId}
         */
        public SchoolClassAggregatePropVOProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link SchoolClassAggregatePropVO#getName}
         */
        public SchoolClassAggregatePropVOProxyFetcher name() {
            return add(getProxy().name());
        }

        /**
         * {@link SchoolClassAggregatePropVO#getStudentSize}
         */
        public SchoolClassAggregatePropVOProxyFetcher studentSize() {
            return add(getProxy().studentSize());
        }


        @Override
        protected SchoolClassAggregatePropVOProxyFetcher createFetcher(SchoolClassAggregatePropVOProxy cp, AbstractFetcher<SchoolClassAggregatePropVOProxy, SchoolClassAggregatePropVO, SchoolClassAggregatePropVOProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new SchoolClassAggregatePropVOProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
